package app.netant.book.ws65;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class Ws65Root extends BaseRoot {
	
	private String type = "玄幻魔法";
	
	public Ws65Root(){
		this.homeUrl = "http://www.65ws.com/flsort/sort1/1.html";
		this.pageUrl = "http://www.65ws.com/flsort/sort1/";
		this.tableKey = "ws65";
		this.type = "玄幻魔法";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new Ws65Page(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new Ws65Detail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new Ws65Entity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		entity.setNovelType(type);
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		Ws65Root root = new Ws65Root();
		root.analyse(2005,3946);
		//root.excepCycle();
	}


	
}
